﻿//创建时间: 2010-10-11
//创建作者: 李 城
//功能说明: 时区列表  
//最后修改: 2010-10-11
using System;
using System.Collections.Generic;

using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

using TRPOP.Common;
using TRPOP.CMS.Web.UI;


using TRPOP.CMS.Business;
using TRPOP.CMS.Model;
using System.Collections;

namespace TRPOP.CMS.Web.Admin
{
    public partial class TimeZone_list : BaseAdmin
    {
        #region 当前页面权限验证
        protected override void SubPageInit()
        {
            base.m_SubPagePermission = Plugin.PermissionKeys.PermissionEnum.SystemManage_Other;
        }
        #endregion


        #region 页面变量
        protected string m_strTitle = "时区管理";
        protected int m_cid = 0;
        TimeZoneManage m_TimeZoneManage = new TimeZoneManage();
        #endregion

        #region 页面事件
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
                BindData();
        }
        protected void lbtnDelete_Click(object sender, EventArgs e)
        {
            LinkButton lbtn = (LinkButton)sender;
            int intDelId = int.Parse(lbtn.CommandArgument);
            SubmitAlertDelete(m_TimeZoneManage.DeleteInfoById(intDelId));
            BindData();
        }

        protected void btnSubmit_Click(object sender, EventArgs e)
        {
            string Ids = RequestHelper.RequestString("delid");
            if (Ids.Length == 0)
            {
                Alert("请先选中要删除的信息");
                BindData();
                return;
            }
            SubmitAlertDelete(m_TimeZoneManage.DeleteInfoByIds(Ids));
            BindData();
        }

        protected void PageChanged(object sender, EventArgs e)
        {
            BindData();
        }
        #endregion

        #region 页面方法
        public void BindData()
        {
            int recordCount = 0;
            rptList.DataSource = m_TimeZoneManage.GetListByPager(UC_Pager.CurrentPage, UC_Pager.PageSize, "", " TimeZoneId ", out recordCount);
            rptList.DataBind();
            UC_Pager.RecordCount = recordCount;
        }
        #endregion
    }
}
